<template>
  <div>
    <div class="lampchoose">
      <el-select v-model="Choice" placeholder="请选择设备" :popper-append-to-body="false">
        <el-option
          v-for="item in Selection"
          :key="item.name"
          :label="item.name"
          :value="item.devType"
          @click.native="equipmentSwitch(item.name)"
        ></el-option>
      </el-select>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      Selection: [
        {
          name: "IP音响",
          devType: 8
        },
        {
          name: "实时对讲",
          devType: 9
        }
      ],
      Choice: 8
    };
  },

  methods: {
    equipmentSwitch(e) {
      switch (e) {
        case "IP音响":
          this.imcType = 8;
          this.$router.push("/distribution");
          this.nesting = true;
          break;
        case "实时对讲":
          this.imcType = 9;
          this.nesting = true;
          break;
      }
      this.$emit('changeImctype',this.imcType)
    }
  }
};
</script>
<style  scoped>
</style>